﻿<%@ Page Language="C#" %>

<script runat="server">
    public void Server_OpenDialog(object sender, EventArgs e)
    {
        //DemoDialog.AutoOpen = true;
        ////DemoDialog.ButtonCommand += new CommandEventHandler(DemoDialog_ButtonCommand);
        //DialogButton b=new DialogButton();
        //b.CommandName="test";
        //b.Text="post";
        //DemoDialog.Buttons.Add(b);
        //DemoDialog.BodyTemplate = null;
        //DemoDialog.ShowModal = true;
        
    }
    protected void Page_Load(object sender, EventArgs e)
    {

        string breakpoint = "please place a break point in this line, and see the DOUBLE postback";
    }
    protected void DemoDialog_ButtonCommand(object sender, CommandEventArgs e)
    {
        string c = e.CommandName;
    }
    
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="scriptMag" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <br />
    <DotNetAge:SimpleButton ID="SimpleButton1" runat="server" Text="Open Dialog" OnClick="Server_OpenDialog" />
    <asp:Button ID="Button1" runat="server" Text="Button" />  <br />
    <DotNetAge:Dialog ID="DemoDialog" runat="server"
        Title="Server Dialog">
<%--        <Buttons>
            <DotNetAge:DialogButton Text="OK" OnClientClick="$(this).dialog('close')" />
        </Buttons>--%>
       <%-- <BodyTemplate>
            <div style="padding: 30px;">
                This is a Dialog shows via Server.
            </div>
        </BodyTemplate>--%>
    </DotNetAge:Dialog>
    </form>
</body>
</html>
